package com.king.wms.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.king.wms.mapper.BuyerMapper;
import com.king.wms.pojo.Buyer;

@Service
@Transactional
public class BuyerService {
	@Autowired
	BuyerMapper buyermapper;
	
	public List<Buyer> findAll(){
		return buyermapper.findAll();
	}

	public void update(Buyer buyer) {
		// TODO Auto-generated method stub
		buyermapper.update(buyer);
	}

	public void delete(Integer buyer_id) {
		// TODO Auto-generated method stub
		buyermapper.delete(buyer_id);
	}

	public Buyer findBuyerByBuyer_id(Integer buyer_id) {
		// TODO Auto-generated method stub
		return buyermapper.findBuyerByBuyer_id(buyer_id);
	}

	public void insert(Buyer buyer) {
		// TODO Auto-generated method stub
		buyermapper.insert(buyer);
	}
}
